package com.logger;

import org.junit.Test;

import java.util.logging.Level;
import java.util.logging.Logger;

//JUL入门案例
public class JULTest {

    @Test
    public void testQuick() {
        //1.创建日志记录器对象
        Logger logger = Logger.getLogger("com.logger.JULTest");
        //2.日志记录输出
        logger.info("hello jul");

        logger.log(Level.INFO,"hello jul");

        String name = "jack";
        Integer age = 18;

        logger.log(Level.INFO, "用户信息：{0},{1}",new Object[]{name, age});

    }
}
